package com.jeasonzhao.report.vml.base;


public class Rectangle2D
{
    private Vector2D leftTop = null;
    private Vector2D size = null;
    private Object tag = null;
    public Rectangle2D()
    {
        super();
    }

    public Rectangle2D(int nleft,int ntop,int nwidth,int nheight)
    {
        super();
        leftTop = new Vector2D(nleft,ntop);
        size = new Vector2D(nwidth,nheight);
    }

    public Vector2D getSize()
    {
        return size;
    }

    public Vector2D getLeftTop()
    {
        return leftTop;
    }

    public Vector2D getRightBottom()
    {
        return new Vector2D(leftTop.getX() + size.getWidth(),
                            leftTop.getY() + size.getHeight());
    }

    public Object getTag()
    {
        return tag;
    }

    public void setSize(Vector2D size)
    {
        this.size = size;
    }

    public void setLeftTop(Vector2D leftTop)
    {
        this.leftTop = leftTop;
    }

    public void setTag(Object tag)
    {
        this.tag = tag;
    }
}
